import { Action, Actor } from 'iflux2'
import { logTypes } from '../constant/actionTypes.js'
export default class LogActor extends Actor {
    defaultState (){
        return {
            logs:[],
            returnedLog:{},//退货单
            refundLog:{},//退款单
        }
    }

    @Action(logTypes.SET_ORDER_LOG)
    setOrder(state,logs){
        return state.set('logs', logs);
    }

    @Action(logTypes.SET_REFUND_LOG)
    setRefundLog(state,log){
        return state.set('refundLog',log);
    }

    @Action(logTypes.SET_RETURNED_LOG)
    setReturnedLog(state,log){
        return state.set('returnedLog',log);
    }
}